package com.bit.demo.springioc.service;

import com.bit.demo.springioc.model.Student;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

@Service
public class UserService {
//    @Autowired
//    private Student s1;

//    @Qualifier("s2")
//    @Autowired
//    private Student s1;

    @Resource(name = "s2")
    private Student s1;

    public void sayHello(){
        System.out.println("hello user service...");
        System.out.println(s1);
    }
}
